﻿@model OneWeb.ViewModels.HomePageViewModel

@{
    ViewBag.Title = "Once";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="container">
    <div class="col-md-12 content">
        <div class="one-image">
            <img class="img-rounded" src="@Html.DisplayFor(model => model.CurrentContent.ImgUrl)" alt="">
        </div>

        <div class="one-image-footer">
            <div class="one-image-footer-left">
                @Model.CurrentContent.Title 
            </div>
            <div class="one-image-footer-right">
                @Html.DisplayFor(model => model.CurrentContent.PictureAuthor)
            </div>

            <div class="clearfix"></div>
        </div>

        <div class="one-cita-wrapper">
            <div class="one-cita">@Html.DisplayFor(model => model.CurrentContent.Text)</div>

            <div class="one-pubdate">
                <p class="dom">
                       @Model.CurrentContent.PostDate.Day
                </p>
                <p class="may">
                       @Model.CurrentContent.PostDate.ToString("y")
                </p>
            </div>

            <div class="clearfix"></div>
        </div>

        <!--上一篇&下一篇-->
        <div class="one-pager">
            @if (Model.PreviousContent != null)
            {
                <a href="@Url.Action("index", "home", new { Id = Model.PreviousContent.Id })" class="previous">上一篇： @Model.PreviousContent.TextAuthors</a>
            }
            else
            {
                <a class="previous">上一篇：无</a>
            }

            @if (Model.NextContent != null)
            {
                <a href="@Url.Action("index", "home", new { Id = Model.NextContent.Id })" class="next">下一篇：@Model.NextContent.TextAuthors</a>
            }
            else
            {
                <a class="next disabled">下一篇：无</a>
            }
        </div>
    </div>
</div>
